<template>
  <div id="AsnDetailList">
    <div class="detail">
      <component :data="{detailData,argument}" :is="currentComponent"></component>
    </div>
  </div>

</template>

<script>
import tableTitle from 'commons/TableTitle'
import navMenu from 'commons/NavMenu'
import baseMixin from '@/mixins/BaseMixin'
import config from '../Config'

export default {
  name: 'DetailList',
  mixins: [baseMixin, config],
  data() {
    return {
      newFlag: false,
      detailsFlag: false,
      argument: {},
      detailData: {},
      selectData: [],
      detailNav: '1',
      componentConfig: [
        {
          name: 'Table',
          label: 'table',
          component: () => import('./page/Table.vue')
        }
      ]
    }
  },
  computed: {
    currentComponent() {
      return this.componentConfig[this.detailNav - 1].component
    }
  },
  methods: {
    //删除数据
    async del(data) {
      /*try {
                    let res = await this.$api.post(`/deleteContractDetail/${this.$store.state.wms}`, data);
                    
                        this.$message.success(res.returnMgr);
                        this.$children[1].getTableData(1, {})
                    
                } catch (e) {
                    this.$message.error(e);
                } finally {
                    this.$children[1].$refs.table.delSelectData(data);
                }*/
    },
    //选中的数据
    setSelectData(data) {
      this.$emit('setSelectData', data)
    },
    //返回试图
    backList() {
      this.detailNav = '1'
      this.detailsFlag = false
    }
  },
  mounted() {
    this.argument = this.$route.query
  },
  components: {
    'v-tableTitle': tableTitle,
    'v-navMenu': navMenu
  },
  watch: {}
}
</script>

<style>
</style>
